package controllers;

import javax.swing.JFrame;

import views.BoardingSecurityCheckView;
import controllers.uiControllers.MainViewController;
import controllers.uiControllers.PortalController;
import core.logic.services.BoardingSecurityCheckService;
import core.logic.services.createServices.ToevoegenPersoneelService;
import core.models.dataModels.BoardingSecurityCheckModel;


public class BoardingSecurityCheckController
{
	private static JFrame scherm;
	
	public static void showView()
	{
		BoardingSecurityCheckModel model = BoardingSecurityCheckService.getNieuwModel();
		scherm = new BoardingSecurityCheckView(model);
		MainViewController.showView(scherm);
	}
	
	public static void closeView()
	{
		ToevoegenPersoneelService.getToevoegenPersoneelModel();		
		scherm.dispose();
		MainViewController.removeView(scherm);
		PortalController.showView();
	}
	public static BoardingSecurityCheckModel getPersoonByIdKaartNr(BoardingSecurityCheckModel model)
	{
		model = BoardingSecurityCheckService.getPersoonByIdNr(model);
		return model;
		
	}
	public static BoardingSecurityCheckModel setGeboekteVluchtenPassagier(BoardingSecurityCheckModel model)
	{
		model = BoardingSecurityCheckService.getGeboekteVluchtenPassagier(model);
		return model;
	}
	public static void updateStatusSecurePassagier(BoardingSecurityCheckModel model)
	{
		BoardingSecurityCheckService.updatePassagierStatus(model);
	}
}
